package Test;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        System.out.println("提示：0至9分别对应城市合肥，北京，上海，重庆，广州，南京，深圳，桂林，昆明，西安，输入的起点和终点用数字代表。");
        System.out.println("请输入要查找的起始点和终止点：");
        Scanner sc = new Scanner(System.in);
        int statr = sc.nextInt();
        int end = sc.nextInt();
        AllRoads3 a = new AllRoads3();
        a.dfs(statr,end);
        for (int i = 0; i < a.ans.size(); i++) {
            System.out.println(a.ans.get(i).toString().replace("A","合肥").replace("B","北京")
                    .replace("C","上海").replace("D","重庆").replace("E","广州")
                    .replace("F","南京").replace("G","深圳").replace("H","桂林")
                    .replace("I","昆明").replace("J","西安"));
        }
    }
}
